<%-- 
    Document   : AsignarPersonalFeria
    Created on : 26-may-2014, 17:04:59
    Author     : Isaac Paliza <anndysaac@hotmail.com>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
--%>
<%@page import="Modelo.ENT_Feria"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>

        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <title>SICFEST - Asignar Personal Feria</title>
        <style type="text/css">
            html { height: 100% }
            body { height: 100%; margin: 0; padding: 0 }
            #map_canvas { height: 100% }
        </style>
        <script type="text/javascript"
                src="http://maps.googleapis.com/maps/api/js?sensor=false">
        </script>
        <script type="text/javascript">
            function initialize() {
                var myOptions = {
                    center: new google.maps.LatLng(-12.046374, -77.0427934),
                    zoom: 13,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                };
                var map = new google.maps.Map(document.getElementById("map_canvas"),
                        myOptions);
            }
        </script>
    </head>
    <body onload="initialize()">
        <%
            List<ENT_Feria> EF = (ArrayList<ENT_Feria>) request.getAttribute("ListaFeria");
        %>
        <header>
            <samp style=color:#FA6900;>Asignar Personal Feria</samp>
        </header>
        <section>
            <form action="AsignarPersonalFeria" method="GET" style="display:inline">
                <table width="100%" height="100%">
                    <tr>
                        <td colspan="4">Elejir Feria</td>
                        <td colspan="4">
                        <td>
                            <select name="idFeria" >
                                <option value="0" selected>Seleccionar...</option>
                                <% for (ENT_Feria du : EF) {%>
                                <option value="<%= du.getIdFeria()%>"><%= du.getNombre()%></option>
                                <% }%>
                            </select>
                        </td>
                        <td colspan="4">
                            <input type="submit" name="CosultarFeria" value="Cosultar"/>
                        </td>
                        </td>
                    </tr>
                </table>
            </form>
        </section>
        <section>
            <table width="100%" height="100%">
                <c:forEach items="${requestScope['DatosdeFeria']}" var="d" varStatus="c">
                    <tr align="left">
                        <th>ID Feria</th>
                        <td>${d['idFeria']}</td>
                        <th>Nombre de Feria</th>
                        <td>${d['nombre']}</td>
                    </tr>
                    <tr align="left">
                        <th>Fecha Inicio</th>
                        <td>${d['fechaInicio']}</td>
                        <th>Fecha Final</th>
                        <td>${d['fechaFin']}</td>
                    </tr>
                    <tr align="left">
                        <th>N de Trabajadores</th>
                        <td>${d['nTrabajadores']}</td>
                        <td colspan="2">${d['idFeria']}</td>
                    </tr>
                    <tr align="left">
                        <th>Direccion</th>
                        <td colspan="4">${d['ubicacion']}</td>
                    </tr>
                </c:forEach>
            </table>
        </section>
        <section>
            <div id="map_canvas" style="width:60%; height:60%"></div>
        </section>
        </body>
    </html>
